Microsoft has provided a standard C library that has a larger static FILE
stream buffer to circumvent this problem, and they would like get a similar MPW
C library from Apple.
A The _NFILES macro in stdio.h defines the maximum number of files that can be
opened. This is set to 40 in the ETO #16 pre-release, SC-compatible, MPW
libraries (otherwise it's 20). Support for more than 40 files is not planned,
so there won't be a final version of libraries for MPW C with a larger
open-file limit.
There is a possible workaround -- use our low-level I/O calls instead of the stream I/O calls. The number of files you can open with low-level calls is limited only by available memory. (These calls are documented in the chapter on building MPW tools in Building and Managing Programs with MPW). Low-level I/O calls can be used in applications, but this isn't obvious because the documentation isn't well organized.
It's possible that our low-level I/O calls may not provide you with sufficient
functionality for your port, assuming that you are using fprintf or a related
function, and there is no low-level equivalent for this. If your usage is
limited to getc/putc/fread/fwrite, it would be fairly simple to emulate these
on top of low-level I/O using the low-level read and write functions. However,
a better, long-term solution would be to move to the SC compiler and its
associated libraries.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help